This article provides instructions on explicitly configuring your Ditto instance to listen for connections on a specific port and to connect to remote instances using a host (IP) and port.
DittoTransportConfig
does not enable this feature by default.Rather, you manually enable peer-to-peer connections using EnableAllPeerToPeer()
. (See Enabling and Disabling Transports for more information.)startSync()
, create a DittoTransportConfig
object with the desired settings.ditto.SetTransportConfig
API method, set the created object on your Ditto instance.startSync
method on your Ditto instance to initiate sync with the configured settings.